package bairui.international.model.domain.jpa;

/**
 *
 * @see TB_BranchCompanyStaffWithdrawOrder 分公司员工提现单
 *
 */
public class TestData_TB_BranchCompanyStaffWithdrawOrder
{

	private final static org.apache.commons.text.RandomStringGenerator Generator = new org.apache.commons.text.RandomStringGenerator.Builder().withinRange(new char[][]{{'a','z'}, {'A','Z'}, {'0','9'}}).build();

	@SuppressWarnings({ "unchecked", "rawtypes" })
	@org.springframework.transaction.annotation.Transactional(rollbackFor=java.lang.Throwable.class)
	public static TB_BranchCompanyStaffWithdrawOrder saveMust(
		org.springframework.context.ApplicationContext context,
		bairui.international.model.domain.jpa.TB_BranchCompanyStaff branchCompanyStaff
	){
		org.springframework.data.jpa.repository.JpaRepository repository = (org.springframework.data.jpa.repository.JpaRepository)context.getBean("repository_BranchCompanyStaffWithdrawOrder");
		return (TB_BranchCompanyStaffWithdrawOrder)repository.save(newMust(
				branchCompanyStaff
			));
	}
	
	public static TB_BranchCompanyStaffWithdrawOrder newMust(
		bairui.international.model.domain.jpa.TB_BranchCompanyStaff branchCompanyStaff
	){
		return new TB_BranchCompanyStaffWithdrawOrder(new TB_BranchCompanyStaffWithdrawOrder.MustProperties() {
			/** 金额 */
			@Override public Double getMoney(){
				return com.sh_lianjing.test.random.Util_GenerateRandom.doubleRandom(0, Long.MAX_VALUE);
			}
			/** 编号 */
			@Override public String getNumber(){
				return Generator.generate(0, 32);
			}
			/** 状态 */
			@Override public bairui.international.model.status.State_BranchCompanyStaffWithdrawOrder getState(){
				return bairui.international.model.status.State_BranchCompanyStaffWithdrawOrder.Canceled;
			}
			/** 分公司员工 */
			@Override public bairui.international.model.domain.jpa.TB_BranchCompanyStaff getBranchCompanyStaff(){
				return branchCompanyStaff;
			}
		});
	}
	

	@SuppressWarnings({ "unchecked", "rawtypes" })
	@org.springframework.transaction.annotation.Transactional(rollbackFor=java.lang.Throwable.class)
	public static TB_BranchCompanyStaffWithdrawOrder saveAll(
		org.springframework.context.ApplicationContext context,
		bairui.international.model.domain.jpa.TB_BranchCompanyStaff branchCompanyStaff
	,bairui.international.model.domain.jpa.TB_BranchCompanyStaff verifior
	){
		org.springframework.data.jpa.repository.JpaRepository repository = (org.springframework.data.jpa.repository.JpaRepository)context.getBean("repository_BranchCompanyStaffWithdrawOrder");
		return (TB_BranchCompanyStaffWithdrawOrder)repository.save(newAll(
				branchCompanyStaff
				,verifior
			));
	}
	
	public static TB_BranchCompanyStaffWithdrawOrder newAll(
		bairui.international.model.domain.jpa.TB_BranchCompanyStaff branchCompanyStaff
	,bairui.international.model.domain.jpa.TB_BranchCompanyStaff verifior
	){
		return new TB_BranchCompanyStaffWithdrawOrder(
			new TB_BranchCompanyStaffWithdrawOrder.MustProperties() {
				/** 金额 */
				@Override public Double getMoney(){
					return com.sh_lianjing.test.random.Util_GenerateRandom.doubleRandom(0, Long.MAX_VALUE);
				}
				/** 编号 */
				@Override public String getNumber(){
					return Generator.generate(0, 32);
				}
				/** 状态 */
				@Override public bairui.international.model.status.State_BranchCompanyStaffWithdrawOrder getState(){
					return bairui.international.model.status.State_BranchCompanyStaffWithdrawOrder.Canceled;
				}
				/** 分公司员工 */
				@Override public bairui.international.model.domain.jpa.TB_BranchCompanyStaff getBranchCompanyStaff(){
					return branchCompanyStaff;
				}
			},
			new TB_BranchCompanyStaffWithdrawOrder.OptionalSingleProperties() {
				/** 提交时间 */
				@Override public java.util.Date getSubmitDate(){
					return new java.util.Date();
				}
				/** 审核时间 */
				@Override public java.util.Date getVerifyDate(){
					return new java.util.Date();
				}
				/** 用户名 */
				@Override public String getRealName(){
					return Generator.generate(0, 30);
				}
				/** 提现账号 */
				@Override public String getAccountNumber(){
					return Generator.generate(0, 50);
				}
				/** 开户行 */
				@Override public String getBank(){
					return Generator.generate(0, 100);
				}
				/** 审核意见 */
				@Override public String getVerifyComment(){
					return Generator.generate(0, 255);
				}
				/** 汇款截图 */
				@Override public String getRemitImgUrl(){
					return Generator.generate(0, 500);
				}
				/** 审核者 */
				@Override public bairui.international.model.domain.jpa.TB_BranchCompanyStaff getVerifior(){
					return verifior;
				}
			}
		);
	}
	

}
